scrolledwindow: Fix code sample compilation
authorTimm Bäder <mail@baedert.org>
Wed, 3 Jan 2018 12:51:03 +0000 (13:51 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Sun, 7 Jan 2018 16:38:41 +0000 (16:38 +0000)
gtk/gtkscrolledwindow.c

index 25e5d1cd3a1fbf14c19e41ab9a16e8cf7b2fa627..ac06f1cc105ca417ee7c32949842cb1b649a129c 100644 (file)
  *
  * If gtk_container_add() has added a #GtkViewport for you, you can remove
  * both your added child widget from the #GtkViewport, and the #GtkViewport
- * from the GtkScrolledWindow, with either of these calls:
+ * from the GtkScrolledWindow, like this:
  * |[<!-- language="C" -->
+ * GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ * GtkWidget *child_widget = gtk_button_new ();
+ *
+ * // GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically
+ * // add a GtkViewport.
  * gtk_container_remove (GTK_CONTAINER (scrolled_window),
  *                       child_widget);
  * // or